<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>凡客-列表页</title>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/org/bootstrap-3.3.5-dist/css/bootstrap.min.css" />
		<script src="{{__PUBLIC__}}/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="{{__PUBLIC__}}/Home/org/bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>

		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/lists.css" />
	</head>

	<body>
		{{include file="VIEW_PATH/Common/header.php"}}
		<!--分类商品展示区-->
			<!--分类区-->
			<!-- 控制最后一个a样式 -->
			<script type="text/javascript">
				$(function(){
					$('#classify .classify_title .left span:last-child').remove();
					$('#classify .classify_title .left a:last-child').css('color', 'rgb(180, 180, 180)').removeAttr('href');
					$('.classify_tab li p').eq(1).html($('#classify .classify_title .left a:last-child').text());
				})
			</script>
		<div id="classify">
			<div class="classify_title">
				<div class="left">当前位置：
					<a href="{{U('index',array('cid'=>0))}}">所有分类</a>：
					{{foreach from="$typeData" key="$k" value="$v"}}
					<a href="{{U('List/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a><span style="color:#333;"> ></span>
					{{endforeach}}
				</div>
				<div class="right">找到相关商品
					<span>{{$total}}</span>
					款
				</div>
			</div>
			<!-- 删除筛选 -->
			<script type="text/javascript">
				$(function(){
					$('.sx_del').click(function() {
						var xuhao = $(this).attr('xuhao');
						var href = $('.tab_hover').eq(xuhao).find('a').first().attr('href');
						window.location.href=href;
					});
					
				})
			</script>
			<div class="classify_tab">
				<ul>
					<!-- 商品筛选 -->
					<li class="shaixuan">
						<p>商品筛选</p>
						<div class="left">
							{{foreach from="$paramData" key="$k" value="$v"}}
							<div class="attr"><i>{{$v['type_name']}}</i>：<b>{{$v['name']}}</b><a xuhao="{{$k}}" class="sx_del"></a></div>
							{{endforeach}}
						</div>
					</li>
					<li class="title">
						<p></p>
						<div class="left">
							{{foreach from="$typeSon" key="$k" value="$v"}}
								{{if value="$v['total']!=0"}}
									<div class="tt_height">
										<a href="{{U('index',array('cid'=>$v['cid']))}}">{{$v['cname']}}（{{$v['total']}}）</a>
									</div>
								{{endif}}
							{{endforeach}}
						</div>
						<em></em>
					</li>

					<!-- hover效果 -->
					<script type="text/javascript">
						$(function(){
							$('.tab_hover').hover(function() {
								$(this).addClass('hover');
							}, function() {
								$(this).removeClass('hover');
							});
						})
					</script>
					{{foreach from="$goodsValue" key="$k" value="$v"}}
					<li class="tab_hover">
						<?php 
							$temp=$param;
							// 不限
							$temp[$k]=0;
						 ?>
						<p>{{$v['name']}}</p>
						<div class="left">
							<div class="xuan_box">
								<a href="{{U('index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)))}}"  {{if value="$param[$k] eq 0"}} class="xuanding" {{endif}}>不限</a>
							</div>
							{{foreach from="$v['value']" key="$kk" value="$vv"}}
								{{if value="$vv['gavalue']!='0'"}}
									<?php $temp[$k]=$vv['gaid'] ?>
										<div class="xuan_box">
											<a href="{{U('index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)))}}" {{if value="$param[$k] eq $vv['gaid']"}}class="xuanding"{{endif}}>{{$vv['gavalue']}}（{{$vv['sonNum']}}）</a>
										</div>
								{{endif}}
							{{endforeach}}
						</div>
					</li>
					{{endforeach}}
				</ul>
			</div>
		</div>

		<!-- 计算位置 -->
		<script type="text/javascript">
			// $(function(){
			// 	var x = $('#sort').offsetTop;
			// 	alert(x);
			// })
		</script>

			<!--排序区-->
		<div id="sort">
			<div class="sort_top">
				<div class="left">
					<a href="">全部商品</a>
				</div>
				<!-- <div class="right">
					<span>1/4</span>
					<a href="" class="right_2"></a>
					<a href="" class="right_1"></a>
				</div> -->
			</div>
			<div class="sort_bottom">
				<div class="sort_bottom_1">
					<a href="">默认<span></span></a>
				</div>
				<div class="sort_bottom_1">
					<a href="">销量<span></span></a>
				</div>
				<div class="sort_bottom_1">
					<a href="">好评<span></span></a>
				</div>
				<div class="sort_bottom_1">
					<a href="">最新<span class="up"></span></a>
				</div>
				<div class="price">
					<a href="">价格<span class="index"></span><span class="up"></span></a>
					<div>
						<a href="">价格<span></span></a>
						<a href="">折扣<span></span></a>
						<a href="" style="border-bottom: 1px solid #CCCCCC;">直降<span></span></a>
					</div>
				</div>
				<div class="bettwen">
					<input type="text" name="" id="" value="" />
					<span>-</span>
					<input type="text" name="" id="" value="" />
				</div>
				<!-- <div class="combine">
					<a href="">合并同款</a>
				</div> -->
			</div>
		</div>




			<!--展示区-->
		<div id="show">
			{{if value="empty($goodsData)"}}
				<div class="box">
					抱歉！还没有该类型的商品！
				</div>
			{{else}}
				{{foreach from="$goodsData" key="$k" value="$v"}}
					<div class="box">
						<a href="{{U('Desc/index',array('gid'=>$v['gid']))}}" target="_blank" class="pic"><img src="{{$v['pic']}}" alt="" /></a>
						<a href="{{U('Desc/index',array('gid'=>$v['gid']))}}" target="_blank" class="font">{{$v['gname']}}</a>
						<p>售价￥{{$v['sprice']}}</p>
					</div>
				{{endforeach}}
			{{endif}}
		</div>
		
		
		<!--分页区-->
		
		
		
		

		<!--分类商品展示区-->
		{{include file="VIEW_PATH/Common/footer.php"}}
		
		
		
	</body>

</html>